\newpage

\subsubsection{Materialization}
\noindent
(Why materialization.)

As the join results usually need to be materialized to block storage like disks, ESJ structures the outputs of the join engine as snapshots to facilitate the materialization. 

\noindent
(What is a snapshot.)

A \textit{snapshot} is a set of records that share a common identifier, which is usually the committing timestamp. The committing of a snapshot could be either periodical or according to the punctuations~\cite{tkde03:Tucker} within the input streams. 

\noindent
(How to choose the snapshot size.)

Note that the snapshot size is customizable with respect to the application. Big snapshot size benefits much sequential write within the materialization, yet small snapshot size benefits fine-grained retrieval within the query. 

\subsubsection{Query Proxy and Query Processor}
\noindent
(Query types.)

Applications retrieve the join results through queries. ESJ supports both the \textit{continuous query}, which requests up-to-date results infinitely, and the \textit{one-time query}, which requests the results within a time span. 

\noindent
(Multiple queries.)

By applying the client-server model for query requesting and responding, multiple queries can be served simultaneously. 

\noindent
(What query proxy does.)

As the client-end, the query proxy converts the applications' query requests into stream events, and, reversely, the query response stream into the applications' format. 

\noindent
(What query processor does.)

As the server-end, the query processor parses the requests within the recieved stream events, answers the queries by selecting the records according to the query predicates and performing necessary projection, and sends the results throught the response stream. 

\noindent
([Can drop] The relationship between proxy and processor)

Note that the query proxy is pluggable and the query processor is stateless, meaning that the query processor can handle a scaling number of query proxies.
